namespace Spire
{
    using OmegaBot;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class SpireSetup : ClassSetupPanel
    {
        public CheckBox ChainAdds;
        public CheckBox ChaseRunners;
        public SpireCombat combatClass;
        public IContainer components;
        public NumericUpDown GhostDistance;
        public Label GhostDistanceLabel;
        public GroupBox groupBox1;
        public GroupBox groupBox2;
        public GroupBox groupBox3;
        private GroupBox groupBox4;
        public GroupBox groupBox5;
        public GroupBox groupBox6;
        private GroupBox groupBox7;
        public TrackBar HealingWaveHealth;
        public Label HWaveLabel;
        public Label label1;
        public Label label10;
        public Label label12;
        public Label label13;
        public Label label14;
        public Label label15;
        public Label label2;
        public Label label3;
        public Label label4;
        public Label label5;
        public Label label7;
        public Label label8;
        public TrackBar LesserHealingWaveHealth;
        public Label LHWaveLabel;
        public ComboBox LightningBoltOption;
        public ComboBox MainHandEnchant;
        public ComboBox MainShock;
        public TrackBar MeleeFinisherHealth;
        public Label MeleeFinisherHealthLabel;
        public NumericUpDown MountDistance;
        public Label MountDistancelabel;
        public ComboBox OffHandEnchant;
        public ComboBox PullOption;
        public TrackBar ShamanisticRageMana;
        public Label ShamanisticRageManaLabel;
        public TrackBar ShieldTwistingMana;
        public Label ShieldTwistingManaLabel;
        public CheckBox StoneclawAdds;
        public TabControl tabControl1;
        public TabPage tabPage1;
        public TabPage tabPage2;
        public TabPage tabPage3;
        public TabPage tabPage4;
        public ToolTip tip;
        public TextBox TotemID;
        public Label TotemIDLabel;
        public TextBox TotemName;
        public Label TotemNameLabel;
        public CheckBox UseCallOfAncestors;
        public CheckBox UseCallOfElements;
        public CheckBox UseCallOfSpirits;
        public CheckBox UseFlameShockDebuff;
        public CheckBox UseFrostShockDebuff;
        public CheckBox UseGhostWolf;
        public CheckBox UseMount;
        public CheckBox UseTotems;

        public SpireSetup()
        {
            this.components = null;
            this.combatClass = null;
            this.InitializeComponent();
        }

        public SpireSetup(SpireCombat combatClass)
        {
            this.components = null;
            this.combatClass = combatClass;
            this.InitializeComponent();
            this.PullOption.Text = combatClass.Ini.GetString("combat", "PullOption");
            if (this.PullOption.Text.Trim() == string.Empty)
            {
                this.PullOption.Text = "LBolt";
            }
            this.LightningBoltOption.Text = combatClass.Ini.GetString("combat", "LightningBoltOption");
            if (this.LightningBoltOption.Text.Trim() == string.Empty)
            {
                this.LightningBoltOption.Text = "> 8 yards";
            }
            this.UseFlameShockDebuff.Checked = combatClass.Ini.GetBoolean("combat", "UseFlameShockDebuff", true);
            this.UseFrostShockDebuff.Checked = combatClass.Ini.GetBoolean("combat", "UseFrostShockDebuff", false);
            this.MainShock.Text = combatClass.Ini.GetString("combat", "MainShock");
            if (this.MainShock.Text.Trim() == string.Empty)
            {
                this.MainShock.Text = "Earth";
            }
            this.MeleeFinisherHealth.Value = combatClass.Ini.GetInt("combat", "MeleeFinisherHealth", 10);
            this.MeleeFinisherHealthLabel.Text = this.MeleeFinisherHealth.Value.ToString();
            this.StoneclawAdds.Checked = combatClass.Ini.GetBoolean("combat", "StoneclawAdds", true);
            this.ChainAdds.Checked = combatClass.Ini.GetBoolean("combat", "ChainAdds", true);
            this.ShieldTwistingMana.Value = combatClass.Ini.GetInt("buffs", "ShieldTwistingMana", 50);
            this.ShieldTwistingManaLabel.Text = this.ShieldTwistingMana.Value.ToString();
            this.ShamanisticRageMana.Value = combatClass.Ini.GetInt("buffs", "ShamanisticRageMana", 40);
            this.ShamanisticRageManaLabel.Text = this.ShamanisticRageMana.Value.ToString();
            this.MainHandEnchant.Text = combatClass.Ini.GetString("buffs", "MainHandEnchant");
            if (this.MainHandEnchant.Text.Trim() == string.Empty)
            {
                this.MainHandEnchant.Text = "Rockbiter";
            }
            this.OffHandEnchant.Text = combatClass.Ini.GetString("buffs", "OffHandEnchant");
            if (this.OffHandEnchant.Text.Trim() == string.Empty)
            {
                this.OffHandEnchant.Text = "None";
            }
            this.UseTotems.Checked = combatClass.Ini.GetBoolean("buffs", "UseTotems", false);
            this.UseCallOfAncestors.Checked = combatClass.Ini.GetBoolean("buffs", "UseCallOfAncestors", false);
            this.UseCallOfSpirits.Checked = combatClass.Ini.GetBoolean("buffs", "UseCallOfSpirits", false);
            this.UseCallOfElements.Checked = combatClass.Ini.GetBoolean("buffs", "UseCallOfElements", false);
            this.TotemName.Text = combatClass.Ini.GetString("buffs", "TotemName").Trim();
            this.TotemID.Text = combatClass.Ini.GetString("buffs", "TotemID").Trim();
            if (this.TotemID.Text.Trim() == string.Empty)
            {
                this.TotemName.Text = "Stoneskin Totem";
                this.TotemID.Text = "8071";
            }
            this.HealingWaveHealth.Value = combatClass.Ini.GetInt("healing", "HealingWaveHealth", 50);
            this.HWaveLabel.Text = this.HealingWaveHealth.Value.ToString();
            this.LesserHealingWaveHealth.Value = combatClass.Ini.GetInt("healing", "LesserHealingWaveHealth", 0);
            this.LHWaveLabel.Text = this.LesserHealingWaveHealth.Value.ToString();
            this.UseMount.Checked = combatClass.Ini.GetBoolean("movement", "UseMount", false);
            this.MountDistance.Value = combatClass.Ini.GetInt("movement", "MountDistance", 80);
            this.UseGhostWolf.Checked = combatClass.Ini.GetBoolean("movement", "UseGhostWolf", false);
            this.GhostDistance.Value = combatClass.Ini.GetInt("movement", "GhostDistance", 50);
            this.ChaseRunners.Checked = combatClass.Ini.GetBoolean("movement", "ChaseRunners", true);
            this.ControlsEnabled();
        }

        public override void CommitValues()
        {
            this.combatClass.Ini.Set("combat", "PullOption", this.PullOption.Text);
            this.combatClass.Ini.Set("combat", "LightningBoltOption", this.LightningBoltOption.Text);
            this.combatClass.Ini.Set("combat", "UseFrostShockDebuff", this.UseFrostShockDebuff.Checked);
            this.combatClass.Ini.Set("combat", "UseFlameShockDebuff", this.UseFlameShockDebuff.Checked);
            this.combatClass.Ini.Set("combat", "MainShock", this.MainShock.Text);
            this.combatClass.Ini.Set("combat", "MeleeFinisherHealth", this.MeleeFinisherHealth.Value.ToString());
            this.combatClass.Ini.Set("combat", "StoneclawAdds", this.StoneclawAdds.Checked);
            this.combatClass.Ini.Set("combat", "ChainAdds", this.ChainAdds.Checked);
            this.combatClass.Ini.Set("buffs", "ShieldTwistingMana", this.ShieldTwistingMana.Value.ToString());
            this.combatClass.Ini.Set("buffs", "ShamanisticRageMana", this.ShamanisticRageMana.Value.ToString());
            this.combatClass.Ini.Set("buffs", "MainHandEnchant", this.MainHandEnchant.Text);
            this.combatClass.Ini.Set("buffs", "OffHandEnchant", this.OffHandEnchant.Text);
            this.combatClass.Ini.Set("buffs", "UseTotems", this.UseTotems.Checked);
            this.combatClass.Ini.Set("buffs", "UseCallOfAncestors", this.UseCallOfAncestors.Checked);
            this.combatClass.Ini.Set("buffs", "UseCallOfSpirits", this.UseCallOfSpirits.Checked);
            this.combatClass.Ini.Set("buffs", "UseCallOfElements", this.UseCallOfElements.Checked);
            this.combatClass.Ini.Set("buffs", "TotemName", this.TotemName.Text.Trim());
            this.combatClass.Ini.Set("buffs", "TotemID", this.TotemID.Text.Trim());
            this.combatClass.Ini.Set("healing", "HealingWaveHealth", this.HealingWaveHealth.Value.ToString());
            this.combatClass.Ini.Set("healing", "LesserHealingWaveHealth", this.LesserHealingWaveHealth.Value.ToString());
            this.combatClass.Ini.Set("movement", "UseMount", this.UseMount.Checked);
            this.combatClass.Ini.Set("movement", "MountDistance", this.MountDistance.Value.ToString());
            this.combatClass.Ini.Set("movement", "UseGhostWolf", this.UseGhostWolf.Checked);
            this.combatClass.Ini.Set("movement", "GhostDistance", this.GhostDistance.Value.ToString());
            this.combatClass.Ini.Set("movement", "ChaseRunners", this.ChaseRunners.Checked);
            this.combatClass.Ini.Save();
        }

        private void ControlsEnabled()
        {
            this.UseCallOfElements.Enabled = this.UseCallOfAncestors.Enabled = this.UseCallOfSpirits.Enabled = this.TotemName.Enabled = this.TotemID.Enabled = this.TotemNameLabel.Enabled = this.TotemIDLabel.Enabled = this.UseTotems.Checked;
            if (this.UseTotems.Checked)
            {
                this.TotemID.Enabled = this.TotemIDLabel.Enabled = this.TotemName.Enabled = this.TotemNameLabel.Enabled = (!this.UseCallOfSpirits.Checked && !this.UseCallOfElements.Checked) && !this.UseCallOfAncestors.Checked;
            }
            this.LightningBoltOption.Enabled = this.PullOption.Text == "LBolt";
            this.MountDistance.Enabled = this.MountDistancelabel.Enabled = this.UseMount.Checked;
            this.GhostDistance.Enabled = this.GhostDistanceLabel.Enabled = this.UseGhostWolf.Checked;
            this.OffHandEnchant.Enabled = this.MainHandEnchant.Text != "None";
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void HealingWaveHealth_Scroll(object sender, EventArgs e)
        {
            this.HWaveLabel.Text = this.HealingWaveHealth.Value.ToString();
        }

        private void InitializeComponent()
        {
            this.tabControl1 = new TabControl();
            this.tabPage1 = new TabPage();
            this.groupBox3 = new GroupBox();
            this.UseFrostShockDebuff = new CheckBox();
            this.UseFlameShockDebuff = new CheckBox();
            this.MainShock = new ComboBox();
            this.label4 = new Label();
            this.label2 = new Label();
            this.LightningBoltOption = new ComboBox();
            this.PullOption = new ComboBox();
            this.label3 = new Label();
            this.MeleeFinisherHealthLabel = new Label();
            this.label15 = new Label();
            this.MeleeFinisherHealth = new TrackBar();
            this.groupBox5 = new GroupBox();
            this.ChainAdds = new CheckBox();
            this.StoneclawAdds = new CheckBox();
            this.tabPage2 = new TabPage();
            this.ShieldTwistingManaLabel = new Label();
            this.groupBox2 = new GroupBox();
            this.label8 = new Label();
            this.label7 = new Label();
            this.MainHandEnchant = new ComboBox();
            this.OffHandEnchant = new ComboBox();
            this.groupBox1 = new GroupBox();
            this.TotemNameLabel = new Label();
            this.TotemIDLabel = new Label();
            this.TotemID = new TextBox();
            this.TotemName = new TextBox();
            this.UseTotems = new CheckBox();
            this.UseCallOfAncestors = new CheckBox();
            this.UseCallOfSpirits = new CheckBox();
            this.UseCallOfElements = new CheckBox();
            this.label1 = new Label();
            this.ShieldTwistingMana = new TrackBar();
            this.tabPage3 = new TabPage();
            this.groupBox6 = new GroupBox();
            this.label12 = new Label();
            this.label10 = new Label();
            this.HWaveLabel = new Label();
            this.LHWaveLabel = new Label();
            this.label13 = new Label();
            this.label14 = new Label();
            this.LesserHealingWaveHealth = new TrackBar();
            this.HealingWaveHealth = new TrackBar();
            this.tabPage4 = new TabPage();
            this.groupBox7 = new GroupBox();
            this.ChaseRunners = new CheckBox();
            this.groupBox4 = new GroupBox();
            this.UseGhostWolf = new CheckBox();
            this.GhostDistance = new NumericUpDown();
            this.MountDistancelabel = new Label();
            this.GhostDistanceLabel = new Label();
            this.MountDistance = new NumericUpDown();
            this.UseMount = new CheckBox();
            this.tip = new ToolTip();
            this.ShamanisticRageMana = new TrackBar();
            this.label5 = new Label();
            this.ShamanisticRageManaLabel = new Label();
            this.tabControl1.SuspendLayout();
            this.tabPage1.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox5.SuspendLayout();
            this.tabPage2.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.tabPage3.SuspendLayout();
            this.groupBox6.SuspendLayout();
            this.tabPage4.SuspendLayout();
            this.groupBox7.SuspendLayout();
            this.groupBox4.SuspendLayout();
            base.SuspendLayout();
            this.tabControl1.Controls.Add(this.tabPage1);
            this.tabControl1.Controls.Add(this.tabPage2);
            this.tabControl1.Controls.Add(this.tabPage3);
            this.tabControl1.Controls.Add(this.tabPage4);
            this.tabControl1.Dock = DockStyle.Fill;
            this.tabControl1.Location = new Point(0, 0);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new Size(0x1f2, 0xbb);
            this.tabControl1.TabIndex = 0;
            this.tabPage1.BackColor = Color.AliceBlue;
            this.tabPage1.Controls.Add(this.groupBox3);
            this.tabPage1.Controls.Add(this.label4);
            this.tabPage1.Controls.Add(this.label2);
            this.tabPage1.Controls.Add(this.LightningBoltOption);
            this.tabPage1.Controls.Add(this.PullOption);
            this.tabPage1.Controls.Add(this.label3);
            this.tabPage1.Controls.Add(this.MeleeFinisherHealthLabel);
            this.tabPage1.Controls.Add(this.label15);
            this.tabPage1.Controls.Add(this.MeleeFinisherHealth);
            this.tabPage1.Controls.Add(this.groupBox5);
            this.tabPage1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.tabPage1.Location = new Point(4, 0x16);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Padding = new Padding(3);
            this.tabPage1.Size = new Size(490, 0xa1);
            this.tabPage1.TabIndex = 0;
            this.tabPage1.Text = "Combat";
            this.groupBox3.Controls.Add(this.UseFrostShockDebuff);
            this.groupBox3.Controls.Add(this.UseFlameShockDebuff);
            this.groupBox3.Controls.Add(this.MainShock);
            this.groupBox3.Location = new Point(0xa1, 0x19);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new Size(0x61, 0x6c);
            this.groupBox3.TabIndex = 0x17;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Shocks";
            this.UseFrostShockDebuff.AutoSize = true;
            this.UseFrostShockDebuff.Location = new Point(14, 0x18);
            this.UseFrostShockDebuff.Name = "UseFrostShockDebuff";
            this.UseFrostShockDebuff.Size = new Size(0x43, 0x11);
            this.UseFrostShockDebuff.TabIndex = 4;
            this.UseFrostShockDebuff.Text = "Frost DB";
            this.tip.SetToolTip(this.UseFrostShockDebuff, "If selected, ensure that distant target \r\nis slowed.  This is checked before \r\nthe flame debuff or main shocks.\r\nFrost Shock -> [Flame Shock] -> Main Shock -> Main Shock -> ... ");
            this.UseFrostShockDebuff.UseVisualStyleBackColor = true;
            this.UseFlameShockDebuff.AutoSize = true;
            this.UseFlameShockDebuff.Location = new Point(14, 0x2f);
            this.UseFlameShockDebuff.Name = "UseFlameShockDebuff";
            this.UseFlameShockDebuff.Size = new Size(0x48, 0x11);
            this.UseFlameShockDebuff.TabIndex = 4;
            this.UseFlameShockDebuff.Text = "Flame DB";
            this.tip.SetToolTip(this.UseFlameShockDebuff, "Keep flameshock debuff on target.  \r\n[Frost Shock] -> Flame Shock -> Main Shock -> Main Shock -> ... ");
            this.UseFlameShockDebuff.UseVisualStyleBackColor = true;
            this.MainShock.DropDownStyle = ComboBoxStyle.DropDownList;
            this.MainShock.FormattingEnabled = true;
            this.MainShock.Items.AddRange(new object[] { "Earth", "Flame", "Frost" });
            this.MainShock.Location = new Point(14, 70);
            this.MainShock.Name = "MainShock";
            this.MainShock.Size = new Size(0x40, 0x15);
            this.MainShock.TabIndex = 0x16;
            this.tip.SetToolTip(this.MainShock, "Main shock to spam during combat.\r\nOptionally, one can cast flame shock\r\nfirst in the rotation.  ");
            this.label4.AutoSize = true;
            this.label4.Location = new Point(0x6d, 0x25);
            this.label4.Name = "label4";
            this.label4.Size = new Size(0x18, 13);
            this.label4.TabIndex = 0x15;
            this.label4.Text = "Pull";
            this.label2.AutoSize = true;
            this.label2.Location = new Point(0x6d, 0x40);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x1f, 13);
            this.label2.TabIndex = 0x15;
            this.label2.Text = "LBolt";
            this.LightningBoltOption.DropDownStyle = ComboBoxStyle.DropDownList;
            this.LightningBoltOption.FormattingEnabled = true;
            this.LightningBoltOption.Items.AddRange(new object[] { "Once", "> 8 yards", "Always" });
            this.LightningBoltOption.Location = new Point(0x16, 60);
            this.LightningBoltOption.Name = "LightningBoltOption";
            this.LightningBoltOption.Size = new Size(0x51, 0x15);
            this.LightningBoltOption.TabIndex = 20;
            this.tip.SetToolTip(this.LightningBoltOption, 
@"(Once)
Use lightning bolt only for the initial pull.

(> 8 Yards)
Keep spamming lightning bolt until mob 
approaches melee range.  Of course, after 
the first lightning bolt pull, shocks are 
introduced when they cooldown.

(Always)
Always cast lightning bolt until the
melee finisher health.");
            this.PullOption.DropDownStyle = ComboBoxStyle.DropDownList;
            this.PullOption.FormattingEnabled = true;
            this.PullOption.Items.AddRange(new object[] { "LBolt", "Shock" });
            this.PullOption.Location = new Point(0x16, 0x21);
            this.PullOption.Name = "PullOption";
            this.PullOption.Size = new Size(0x51, 0x15);
            this.PullOption.TabIndex = 0x13;
            this.tip.SetToolTip(this.PullOption, "(Lightning Bolt) \r\nPull/use lightning bolt subject to the \r\nsubsequent LBolt constraints.\r\n\r\n(Shock)\r\nPulls with shocks as specified by\r\nsubsequent section. ");
            this.PullOption.SelectionChangeCommitted += new EventHandler(this.PullOption_SelectionChangeCommitted);
            this.label3.AutoSize = true;
            this.label3.Location = new Point(0x1c, 120);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x42, 13);
            this.label3.TabIndex = 6;
            this.label3.Text = "Melee Finish";
            this.MeleeFinisherHealthLabel.AutoSize = true;
            this.MeleeFinisherHealthLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.MeleeFinisherHealthLabel.Location = new Point(0x5f, 0x63);
            this.MeleeFinisherHealthLabel.Name = "MeleeFinisherHealthLabel";
            this.MeleeFinisherHealthLabel.Size = new Size(13, 13);
            this.MeleeFinisherHealthLabel.TabIndex = 0x12;
            this.MeleeFinisherHealthLabel.Text = "0";
            this.label15.AutoSize = true;
            this.label15.Font = new Font("Microsoft Sans Serif", 7f);
            this.label15.Location = new Point(110, 0x63);
            this.label15.Name = "label15";
            this.label15.Size = new Size(0x13, 13);
            this.label15.TabIndex = 0x11;
            this.label15.Text = "hp";
            this.MeleeFinisherHealth.BackColor = Color.AliceBlue;
            this.MeleeFinisherHealth.Location = new Point(15, 0x61);
            this.MeleeFinisherHealth.Maximum = 100;
            this.MeleeFinisherHealth.Name = "MeleeFinisherHealth";
            this.MeleeFinisherHealth.Size = new Size(0x5b, 0x2d);
            this.MeleeFinisherHealth.TabIndex = 0x10;
            this.MeleeFinisherHealth.TickStyle = TickStyle.None;
            this.tip.SetToolTip(this.MeleeFinisherHealth, "If the target's health drops below the specified amount, \r\nexclusively melee the mob until it dies while casting no \r\nother spells.");
            this.MeleeFinisherHealth.Scroll += new EventHandler(this.MeleeFinisherHealth_Scroll);
            this.groupBox5.Controls.Add(this.ChainAdds);
            this.groupBox5.Controls.Add(this.StoneclawAdds);
            this.groupBox5.Location = new Point(0x11d, 0x19);
            this.groupBox5.Name = "groupBox5";
            this.groupBox5.Size = new Size(0x65, 0x4c);
            this.groupBox5.TabIndex = 15;
            this.groupBox5.TabStop = false;
            this.groupBox5.Text = "Adds";
            this.ChainAdds.AutoSize = true;
            this.ChainAdds.Location = new Point(11, 0x2d);
            this.ChainAdds.Name = "ChainAdds";
            this.ChainAdds.Size = new Size(0x4f, 0x11);
            this.ChainAdds.TabIndex = 4;
            this.ChainAdds.Text = "Chain Light";
            this.tip.SetToolTip(this.ChainAdds, "Cast chain lightning on adds.");
            this.ChainAdds.UseVisualStyleBackColor = true;
            this.StoneclawAdds.AutoSize = true;
            this.StoneclawAdds.Location = new Point(11, 0x18);
            this.StoneclawAdds.Name = "StoneclawAdds";
            this.StoneclawAdds.Size = new Size(0x4c, 0x11);
            this.StoneclawAdds.TabIndex = 4;
            this.StoneclawAdds.Text = "Stoneclaw";
            this.tip.SetToolTip(this.StoneclawAdds, "Cast stoneclaw totem on adds to distract\r\nand hopefully stun them.");
            this.StoneclawAdds.UseVisualStyleBackColor = true;
            this.tabPage2.BackColor = Color.MintCream;
            this.tabPage2.Controls.Add(this.groupBox2);
            this.tabPage2.Controls.Add(this.ShamanisticRageManaLabel);
            this.tabPage2.Controls.Add(this.label5);
            this.tabPage2.Controls.Add(this.ShamanisticRageMana);
            this.tabPage2.Controls.Add(this.ShieldTwistingManaLabel);
            this.tabPage2.Controls.Add(this.groupBox1);
            this.tabPage2.Controls.Add(this.label1);
            this.tabPage2.Controls.Add(this.ShieldTwistingMana);
            this.tabPage2.Location = new Point(4, 0x16);
            this.tabPage2.Name = "tabPage2";
            this.tabPage2.Padding = new Padding(3);
            this.tabPage2.Size = new Size(490, 0xa1);
            this.tabPage2.TabIndex = 1;
            this.tabPage2.Text = "Buffs";
            this.ShieldTwistingManaLabel.AutoSize = true;
            this.ShieldTwistingManaLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.ShieldTwistingManaLabel.Location = new Point(0x70, 0x6f);
            this.ShieldTwistingManaLabel.Name = "ShieldTwistingManaLabel";
            this.ShieldTwistingManaLabel.Size = new Size(13, 13);
            this.ShieldTwistingManaLabel.TabIndex = 13;
            this.ShieldTwistingManaLabel.Text = "0";
            this.groupBox2.Controls.Add(this.label8);
            this.groupBox2.Controls.Add(this.label7);
            this.groupBox2.Controls.Add(this.MainHandEnchant);
            this.groupBox2.Controls.Add(this.OffHandEnchant);
            this.groupBox2.Location = new Point(0x4a, 0x12);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(0x75, 0x4e);
            this.groupBox2.TabIndex = 11;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Enchants";
            this.label8.AutoSize = true;
            this.label8.Location = new Point(0x53, 0x34);
            this.label8.Name = "label8";
            this.label8.Size = new Size(0x15, 13);
            this.label8.TabIndex = 1;
            this.label8.Text = "Off";
            this.label7.AutoSize = true;
            this.label7.Location = new Point(0x52, 0x18);
            this.label7.Name = "label7";
            this.label7.Size = new Size(30, 13);
            this.label7.TabIndex = 1;
            this.label7.Text = "Main";
            this.MainHandEnchant.DropDownStyle = ComboBoxStyle.DropDownList;
            this.MainHandEnchant.FormattingEnabled = true;
            this.MainHandEnchant.Items.AddRange(new object[] { "None", "Earthliving", "Flametongue", "Frostbrand", "Rockbiter", "Windfury" });
            this.MainHandEnchant.Location = new Point(9, 20);
            this.MainHandEnchant.Name = "MainHandEnchant";
            this.MainHandEnchant.Size = new Size(0x47, 0x15);
            this.MainHandEnchant.TabIndex = 0;
            this.MainHandEnchant.SelectedIndexChanged += new EventHandler(this.MainHandEnchant_SelectedIndexChanged);
            this.OffHandEnchant.DropDownStyle = ComboBoxStyle.DropDownList;
            this.OffHandEnchant.FormattingEnabled = true;
            this.OffHandEnchant.Items.AddRange(new object[] { "None", "Earthliving", "Flametongue", "Frostbrand", "Rockbiter", "Windfury" });
            this.OffHandEnchant.Location = new Point(9, 0x30);
            this.OffHandEnchant.Name = "OffHandEnchant";
            this.OffHandEnchant.Size = new Size(0x47, 0x15);
            this.OffHandEnchant.TabIndex = 0;
            this.groupBox1.BackColor = Color.Transparent;
            this.groupBox1.Controls.Add(this.TotemNameLabel);
            this.groupBox1.Controls.Add(this.TotemIDLabel);
            this.groupBox1.Controls.Add(this.TotemID);
            this.groupBox1.Controls.Add(this.TotemName);
            this.groupBox1.Controls.Add(this.UseTotems);
            this.groupBox1.Controls.Add(this.UseCallOfAncestors);
            this.groupBox1.Controls.Add(this.UseCallOfSpirits);
            this.groupBox1.Controls.Add(this.UseCallOfElements);
            this.groupBox1.Location = new Point(0x10d, 0x12);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0xc7, 0x7e);
            this.groupBox1.TabIndex = 10;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Totems";
            this.TotemNameLabel.AutoSize = true;
            this.TotemNameLabel.BackColor = Color.MintCream;
            this.TotemNameLabel.Location = new Point(13, 0x47);
            this.TotemNameLabel.Name = "TotemNameLabel";
            this.TotemNameLabel.Size = new Size(0x44, 13);
            this.TotemNameLabel.TabIndex = 7;
            this.TotemNameLabel.Text = "Totem Name";
            this.tip.SetToolTip(this.TotemNameLabel, "Restart omega-bot to update totem name/id!\r\nThe name of the totem is not important.\r\nThis is here to help you remember what the ID is for.");
            this.TotemIDLabel.AutoSize = true;
            this.TotemIDLabel.BackColor = Color.MintCream;
            this.TotemIDLabel.Location = new Point(30, 0x60);
            this.TotemIDLabel.Name = "TotemIDLabel";
            this.TotemIDLabel.Size = new Size(0x33, 13);
            this.TotemIDLabel.TabIndex = 7;
            this.TotemIDLabel.Text = "Totem ID";
            this.tip.SetToolTip(this.TotemIDLabel, 
@"Restart omega-bot to update totem name/id!
The spell id can be found on wowdb.com in the url.
Search for the totem name, and locate the url.
The ID field is important and allows the bot to cast
the corresponding totem spell.");
            this.TotemID.Enabled = false;
            this.TotemID.Location = new Point(0x56, 0x5e);
            this.TotemID.Name = "TotemID";
            this.TotemID.Size = new Size(0x61, 20);
            this.TotemID.TabIndex = 6;
            this.tip.SetToolTip(this.TotemID, 
@"Restart omega-bot to update totem name/id!
The spell id can be found on wowdb.com in the url.
Search for the totem name, and locate the url.
The ID field is important and allows the bot to cast
the corresponding totem spell.");
            this.TotemName.Enabled = false;
            this.TotemName.Location = new Point(0x56, 0x44);
            this.TotemName.Name = "TotemName";
            this.TotemName.Size = new Size(0x61, 20);
            this.TotemName.TabIndex = 6;
            this.tip.SetToolTip(this.TotemName, "Restart omega-bot to update totem name/id!\r\nThe name of the totem is not important.\r\nThis is here to help you remember what the ID is for.");
            this.UseTotems.AutoSize = true;
            this.UseTotems.Location = new Point(0x10, 0x15);
            this.UseTotems.Name = "UseTotems";
            this.UseTotems.Size = new Size(0x53, 0x11);
            this.UseTotems.TabIndex = 5;
            this.UseTotems.Text = "Use Totems";
            this.UseTotems.UseVisualStyleBackColor = true;
            this.UseTotems.CheckedChanged += new EventHandler(this.UseTotems_CheckedChanged);
            this.UseCallOfAncestors.AutoSize = true;
            this.UseCallOfAncestors.Enabled = false;
            this.UseCallOfAncestors.Location = new Point(0x6d, 0x2c);
            this.UseCallOfAncestors.Name = "UseCallOfAncestors";
            this.UseCallOfAncestors.Size = new Size(0x5d, 0x11);
            this.UseCallOfAncestors.TabIndex = 5;
            this.UseCallOfAncestors.Text = "Call Ancestors";
            this.UseCallOfAncestors.UseVisualStyleBackColor = true;
            this.UseCallOfAncestors.CheckedChanged += new EventHandler(this.UseCallOfAncestors_CheckedChanged);
            this.UseCallOfSpirits.AutoSize = true;
            this.UseCallOfSpirits.Enabled = false;
            this.UseCallOfSpirits.Location = new Point(0x6d, 0x15);
            this.UseCallOfSpirits.Name = "UseCallOfSpirits";
            this.UseCallOfSpirits.Size = new Size(0x4a, 0x11);
            this.UseCallOfSpirits.TabIndex = 5;
            this.UseCallOfSpirits.Text = "Call Spirits";
            this.UseCallOfSpirits.UseVisualStyleBackColor = true;
            this.UseCallOfSpirits.CheckedChanged += new EventHandler(this.UseCallOfSpirits_CheckedChanged);
            this.UseCallOfElements.AutoSize = true;
            this.UseCallOfElements.Enabled = false;
            this.UseCallOfElements.Location = new Point(0x10, 0x2c);
            this.UseCallOfElements.Name = "UseCallOfElements";
            this.UseCallOfElements.Size = new Size(0x59, 0x11);
            this.UseCallOfElements.TabIndex = 5;
            this.UseCallOfElements.Text = "Call Elements";
            this.UseCallOfElements.UseVisualStyleBackColor = true;
            this.UseCallOfElements.CheckedChanged += new EventHandler(this.UseCallOfElements_CheckedChanged);
            this.label1.AutoSize = true;
            this.label1.Location = new Point(0x20, 0x83);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x4e, 13);
            this.label1.TabIndex = 7;
            this.label1.Text = "Shield Twisting";
            this.ShieldTwistingMana.BackColor = Color.MintCream;
            this.ShieldTwistingMana.Location = new Point(0x10, 0x6d);
            this.ShieldTwistingMana.Maximum = 100;
            this.ShieldTwistingMana.Name = "ShieldTwistingMana";
            this.ShieldTwistingMana.Size = new Size(0x68, 0x2d);
            this.ShieldTwistingMana.TabIndex = 6;
            this.ShieldTwistingMana.TickStyle = TickStyle.None;
            this.tip.SetToolTip(this.ShieldTwistingMana, "If mana <= trackbar, cast water shield.  \r\nIf mana > trackbar, cast lightning shield.\r\nIn combat, only cast shield if we have 2+ attackers.");
            this.ShieldTwistingMana.Scroll += new EventHandler(this.ShieldTwistingMana_Scroll);
            this.tabPage3.BackColor = Color.SeaShell;
            this.tabPage3.Controls.Add(this.groupBox6);
            this.tabPage3.Location = new Point(4, 0x16);
            this.tabPage3.Name = "tabPage3";
            this.tabPage3.Padding = new Padding(3);
            this.tabPage3.Size = new Size(490, 0xa1);
            this.tabPage3.TabIndex = 2;
            this.tabPage3.Text = "Healing";
            this.groupBox6.Controls.Add(this.label12);
            this.groupBox6.Controls.Add(this.label10);
            this.groupBox6.Controls.Add(this.HWaveLabel);
            this.groupBox6.Controls.Add(this.LHWaveLabel);
            this.groupBox6.Controls.Add(this.label13);
            this.groupBox6.Controls.Add(this.label14);
            this.groupBox6.Controls.Add(this.LesserHealingWaveHealth);
            this.groupBox6.Controls.Add(this.HealingWaveHealth);
            this.groupBox6.Location = new Point(0x20, 0x16);
            this.groupBox6.Name = "groupBox6";
            this.groupBox6.Size = new Size(0xe1, 0x6c);
            this.groupBox6.TabIndex = 1;
            this.groupBox6.TabStop = false;
            this.groupBox6.Text = "Rest";
            this.label12.AutoSize = true;
            this.label12.Location = new Point(0x12, 0x1b);
            this.label12.Name = "label12";
            this.label12.Size = new Size(0x2c, 13);
            this.label12.TabIndex = 2;
            this.label12.Text = "HWave";
            this.label10.AutoSize = true;
            this.label10.Location = new Point(12, 0x38);
            this.label10.Name = "label10";
            this.label10.Size = new Size(50, 13);
            this.label10.TabIndex = 2;
            this.label10.Text = "LHWave";
            this.HWaveLabel.AutoSize = true;
            this.HWaveLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.HWaveLabel.Location = new Point(0x8e, 0x1a);
            this.HWaveLabel.Name = "HWaveLabel";
            this.HWaveLabel.Size = new Size(13, 13);
            this.HWaveLabel.TabIndex = 1;
            this.HWaveLabel.Text = "0";
            this.LHWaveLabel.AutoSize = true;
            this.LHWaveLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.LHWaveLabel.Location = new Point(0x8e, 0x37);
            this.LHWaveLabel.Name = "LHWaveLabel";
            this.LHWaveLabel.Size = new Size(13, 13);
            this.LHWaveLabel.TabIndex = 1;
            this.LHWaveLabel.Text = "0";
            this.label13.AutoSize = true;
            this.label13.Font = new Font("Microsoft Sans Serif", 7f);
            this.label13.Location = new Point(0x9d, 0x37);
            this.label13.Name = "label13";
            this.label13.Size = new Size(0x13, 13);
            this.label13.TabIndex = 1;
            this.label13.Text = "hp";
            this.label14.AutoSize = true;
            this.label14.Font = new Font("Microsoft Sans Serif", 7f);
            this.label14.Location = new Point(0x9d, 0x1a);
            this.label14.Name = "label14";
            this.label14.Size = new Size(0x13, 13);
            this.label14.TabIndex = 1;
            this.label14.Text = "hp";
            this.LesserHealingWaveHealth.BackColor = Color.SeaShell;
            this.LesserHealingWaveHealth.Location = new Point(0x3e, 0x35);
            this.LesserHealingWaveHealth.Maximum = 100;
            this.LesserHealingWaveHealth.Name = "LesserHealingWaveHealth";
            this.LesserHealingWaveHealth.Size = new Size(0x5b, 0x2d);
            this.LesserHealingWaveHealth.TabIndex = 0;
            this.LesserHealingWaveHealth.TickStyle = TickStyle.None;
            this.LesserHealingWaveHealth.Scroll += new EventHandler(this.LesserHealingWaveHealth_Scroll);
            this.HealingWaveHealth.BackColor = Color.SeaShell;
            this.HealingWaveHealth.Location = new Point(0x3e, 0x18);
            this.HealingWaveHealth.Maximum = 100;
            this.HealingWaveHealth.Name = "HealingWaveHealth";
            this.HealingWaveHealth.Size = new Size(0x5b, 0x2d);
            this.HealingWaveHealth.TabIndex = 0;
            this.HealingWaveHealth.TickStyle = TickStyle.None;
            this.tip.SetToolTip(this.HealingWaveHealth, "If health lies below the specified amount,\r\ncast Healing Wave.  Else check for Lesser\r\nHealing Wave health.  ");
            this.HealingWaveHealth.Scroll += new EventHandler(this.HealingWaveHealth_Scroll);
            this.tabPage4.BackColor = Color.FloralWhite;
            this.tabPage4.Controls.Add(this.groupBox7);
            this.tabPage4.Controls.Add(this.groupBox4);
            this.tabPage4.Location = new Point(4, 0x16);
            this.tabPage4.Name = "tabPage4";
            this.tabPage4.Padding = new Padding(3);
            this.tabPage4.Size = new Size(490, 0xa1);
            this.tabPage4.TabIndex = 3;
            this.tabPage4.Text = "Movement";
            this.groupBox7.Controls.Add(this.ChaseRunners);
            this.groupBox7.Location = new Point(0xa1, 20);
            this.groupBox7.Name = "groupBox7";
            this.groupBox7.Size = new Size(0x7b, 0x4c);
            this.groupBox7.TabIndex = 0x10;
            this.groupBox7.TabStop = false;
            this.groupBox7.Text = "Combat";
            this.ChaseRunners.AutoSize = true;
            this.ChaseRunners.Location = new Point(14, 0x1a);
            this.ChaseRunners.Name = "ChaseRunners";
            this.ChaseRunners.Size = new Size(0x63, 0x11);
            this.ChaseRunners.TabIndex = 14;
            this.ChaseRunners.Text = "Chase Runners";
            this.tip.SetToolTip(this.ChaseRunners, "If a mob is fleeing, stick within melee range of the mob by constantly chasing it.  \r\nIf unchecked, only attack it with shocks while keeping within 25 yard range of the mob.");
            this.ChaseRunners.UseVisualStyleBackColor = true;
            this.groupBox4.Controls.Add(this.UseGhostWolf);
            this.groupBox4.Controls.Add(this.GhostDistance);
            this.groupBox4.Controls.Add(this.MountDistancelabel);
            this.groupBox4.Controls.Add(this.GhostDistanceLabel);
            this.groupBox4.Controls.Add(this.MountDistance);
            this.groupBox4.Controls.Add(this.UseMount);
            this.groupBox4.Location = new Point(0x1a, 20);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new Size(0x6b, 0x7c);
            this.groupBox4.TabIndex = 15;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = "Travel";
            this.UseGhostWolf.AutoSize = true;
            this.UseGhostWolf.Location = new Point(0x10, 0x49);
            this.UseGhostWolf.Name = "UseGhostWolf";
            this.UseGhostWolf.Size = new Size(0x4f, 0x11);
            this.UseGhostWolf.TabIndex = 11;
            this.UseGhostWolf.Text = "Ghost Wolf";
            this.tip.SetToolTip(this.UseGhostWolf, "Uses ghost wolf when travelling between waypoints. \r\nChecked only after the mount option. \r\nOnly uses it if no worthy opponents exist within x yards.");
            this.UseGhostWolf.UseVisualStyleBackColor = true;
            this.UseGhostWolf.CheckedChanged += new EventHandler(this.UseGhostWolf_CheckedChanged);
            this.GhostDistance.Enabled = false;
            this.GhostDistance.Location = new Point(0x17, 0x5d);
            this.GhostDistance.Maximum = 500;
            this.GhostDistance.Name = "GhostDistance";
            this.GhostDistance.Size = new Size(0x2b, 20);
            this.GhostDistance.TabIndex = 12;
            this.MountDistancelabel.AutoSize = true;
            this.MountDistancelabel.Enabled = false;
            this.MountDistancelabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.MountDistancelabel.Location = new Point(0x44, 0x2f);
            this.MountDistancelabel.Name = "MountDistancelabel";
            this.MountDistancelabel.Size = new Size(0x20, 13);
            this.MountDistancelabel.TabIndex = 13;
            this.MountDistancelabel.Text = "yards";
            this.GhostDistanceLabel.AutoSize = true;
            this.GhostDistanceLabel.Enabled = false;
            this.GhostDistanceLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.GhostDistanceLabel.Location = new Point(0x43, 0x61);
            this.GhostDistanceLabel.Name = "GhostDistanceLabel";
            this.GhostDistanceLabel.Size = new Size(0x20, 13);
            this.GhostDistanceLabel.TabIndex = 13;
            this.GhostDistanceLabel.Text = "yards";
            this.MountDistance.Enabled = false;
            this.MountDistance.Location = new Point(0x17, 0x2d);
            this.MountDistance.Maximum = 500;
            this.MountDistance.Name = "MountDistance";
            this.MountDistance.Size = new Size(0x2b, 20);
            this.MountDistance.TabIndex = 12;
            this.UseMount.AutoSize = true;
            this.UseMount.Location = new Point(0x10, 0x19);
            this.UseMount.Name = "UseMount";
            this.UseMount.Size = new Size(0x3d, 0x11);
            this.UseMount.TabIndex = 11;
            this.UseMount.Text = "Mounts";
            this.tip.SetToolTip(this.UseMount, "Use mount when travelling between waypoints.  \r\nThis is checked before ghost wolf.\r\nOnly used if nearby mobs of interest > x yards away.");
            this.UseMount.UseVisualStyleBackColor = true;
            this.UseMount.CheckedChanged += new EventHandler(this.UseMount_CheckedChanged);
            this.ShamanisticRageMana.BackColor = Color.MintCream;
            this.ShamanisticRageMana.Location = new Point(0x91, 0x6d);
            this.ShamanisticRageMana.Maximum = 100;
            this.ShamanisticRageMana.Name = "ShamanisticRageMana";
            this.ShamanisticRageMana.Size = new Size(0x68, 0x2d);
            this.ShamanisticRageMana.TabIndex = 6;
            this.ShamanisticRageMana.TickStyle = TickStyle.None;
            this.tip.SetToolTip(this.ShamanisticRageMana, "Usees shamanistic rage in pre-combat before\r\nthe initial pull only if mana is less than the\r\nspecified amount as given on slider.");
            this.ShamanisticRageMana.Scroll += new EventHandler(this.ShamanisticRageMana_Scroll);
            this.label5.AutoSize = true;
            this.label5.Location = new Point(0x9e, 0x84);
            this.label5.Name = "label5";
            this.label5.Size = new Size(0x4c, 13);
            this.label5.TabIndex = 7;
            this.label5.Text = "Shammy Rage";
            this.ShamanisticRageManaLabel.AutoSize = true;
            this.ShamanisticRageManaLabel.Font = new Font("Microsoft Sans Serif", 7f);
            this.ShamanisticRageManaLabel.Location = new Point(0xe9, 0x6f);
            this.ShamanisticRageManaLabel.Name = "ShamanisticRageManaLabel";
            this.ShamanisticRageManaLabel.Size = new Size(13, 13);
            this.ShamanisticRageManaLabel.TabIndex = 13;
            this.ShamanisticRageManaLabel.Text = "0";
            this.tip.SetToolTip(this.ShamanisticRageManaLabel, "0");
            base.Controls.Add(this.tabControl1);
            base.Name = "SpireSetup";
            base.Size = new Size(0x1f2, 0xbb);
            this.tabControl1.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            this.tabPage1.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox5.ResumeLayout(false);
            this.groupBox5.PerformLayout();
            this.tabPage2.ResumeLayout(false);
            this.tabPage2.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.tabPage3.ResumeLayout(false);
            this.groupBox6.ResumeLayout(false);
            this.groupBox6.PerformLayout();
            this.tabPage4.ResumeLayout(false);
            this.groupBox7.ResumeLayout(false);
            this.groupBox7.PerformLayout();
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            base.ResumeLayout(false);
        }

        private void LesserHealingWaveHealth_Scroll(object sender, EventArgs e)
        {
            this.LHWaveLabel.Text = this.LesserHealingWaveHealth.Value.ToString();
        }

        private void MainHandEnchant_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.ControlsEnabled();
        }

        private void MeleeFinisherHealth_Scroll(object sender, EventArgs e)
        {
            this.MeleeFinisherHealthLabel.Text = this.MeleeFinisherHealth.Value.ToString();
        }

        private void PullOption_SelectionChangeCommitted(object sender, EventArgs e)
        {
            this.ControlsEnabled();
        }

        private void ShamanisticRageMana_Scroll(object sender, EventArgs e)
        {
            this.ShamanisticRageManaLabel.Text = this.ShamanisticRageMana.Value.ToString();
        }

        private void ShieldTwistingMana_Scroll(object sender, EventArgs e)
        {
            this.ShieldTwistingManaLabel.Text = this.ShieldTwistingMana.Value.ToString();
        }

        private void UseCallOfAncestors_CheckedChanged(object sender, EventArgs e)
        {
            if (this.UseCallOfAncestors.Checked)
            {
                this.UseCallOfElements.Checked = this.UseCallOfSpirits.Checked = false;
            }
            this.ControlsEnabled();
        }

        private void UseCallOfElements_CheckedChanged(object sender, EventArgs e)
        {
            if (this.UseCallOfElements.Checked)
            {
                this.UseCallOfAncestors.Checked = this.UseCallOfSpirits.Checked = false;
            }
            this.ControlsEnabled();
        }

        private void UseCallOfSpirits_CheckedChanged(object sender, EventArgs e)
        {
            if (this.UseCallOfSpirits.Checked)
            {
                this.UseCallOfElements.Checked = this.UseCallOfAncestors.Checked = false;
            }
            this.ControlsEnabled();
        }

        private void UseGhostWolf_CheckedChanged(object sender, EventArgs e)
        {
            this.ControlsEnabled();
        }

        private void UseMount_CheckedChanged(object sender, EventArgs e)
        {
            this.ControlsEnabled();
        }

        private void UseTotems_CheckedChanged(object sender, EventArgs e)
        {
            this.ControlsEnabled();
        }

        public override void ValidateClassSetup()
        {
            if ((this.UseTotems.Checked && this.TotemID.Enabled) && (this.TotemID.Text.Trim() == string.Empty))
            {
                throw new FormInvalidException("Make sure TotemID field is not empty!", this.TotemID);
            }
        }
    }
}

